Added checks for number endings