Fix rawQuery with read restriction