fixed issue where buttons were staying active