Fix for contains queries