Fix queue check