Corrected error in code