Fixed issue in time differences