fix bug with order scopes so now the tablename is specified