Fix AM/PM bug