Add negative queries support, fix bug with queries on records
compile binary