Corrected Code Errors