Fix queue clearing