Fixed some conditions which were broken the query execution
Version bump to 0.3.7