added missing queries, added support for the specified nulls, removed bug