Corrected typo in code leading to errors