fixing issue with time formatting