Changed registration from window to button