fixed bug to handle non-existing deadlines

concerns #763