debugged error_correct.rb