error on button click fixed