Scope error fixed