fixed buttons not resetting correctly.