Fixing nonblock_compact query