Fixed crash in bg quene update
Other corrections (thanks @armm77 for noticing)