Adjusted for changes to queue functions usage