queue was not appending correctly