Fixed queue pop error