Fix queue not stopping properly.