Fix automatic deadline ending.