fix bugs, allow floating point hours and implement workaround for javascript issue