Moved assignment of priority so remove from queue worked.