Fixed the incorrect values and outputs