bugfix in deadline check