fix for deleteFunctionFromQueue