fixing priority queues