Fixed bugs in delay queue