Added code for removing from queue.