Corrected binding of function to button