memory fixes, introduced queue