Prints error message when it doesn't need to and works fine. Also moves check up slightly to prevent an exploit.
Should work! Should.