Fixed expand/collapse bug