Bugfix in the endtime calculation (again)