Scope error on clicked. Fixed the ugly way