Fixed bugs with the if/else statements and is_numeric functions