Fixed behaviour of top and top_key on empty queues.