button state fix, works on chrome at least