Fixed queue bug