The button inside a button seems to reset the whole app.Why?