Fix typo and add test of queue