fix bug when setting a scope in params

requested_scope is not declared anywhere else in code and this line throws an exception when a scope is sent in the params.