Fixed some button state issues