Fix error handling which relates to deadline miss detection