fixed small am/pm bug