Fixed code, actually tested it this time >_<