Make sure end value is integer