Tried to fix a code that had a few errors