Fix am/pm conversion