fix bug with empty elements in queue