fixed some type casting in time display