Fix am/pm bug