fixed script error causing button to not work