Fixed code error

Fixed a error in the code that broke the last 25 lines of code.