Reworks buttons states