Changed some stuff around to get button visibility working