fix for 12am/pm bug