add check to prevent timedue from being set earlier than timestart