fix bug when table is in other schema