Corrected queue-handling.