Fix time entry and remaining_hours bugs