Made it not accept wrong inputs