More fixes for 1.4 only on custom query definitions