time overflow fix