Needed to free memory allocated to id in queue.cpp