Fixing bug in queue record