Fixed the errors that were in the code