scope error fixed