fixed schema type bug in whereclause