fix bug when setting a scope in params