Added stop function to queue