collapsed and expanded state were not always correct