queuing works without crashing when queue becomes empty