Correct wrong commit unit test and fix regression bug in queue.c