Trying to debug scope error