fixed bug to handle non-existing deadlines