Button state mostly working