Fixed incorrect variable call
Changed function name
Moved button trigger up one level