fix queue encoding issues