Fixed issues with queue