Corrected code error