ticket:427 - fix directql when the query result is a scalar
ticket:413 - fix potential memory leak when reading blob tiles