Fix code with errors