fixing query wrong table.field