Improving autoExpand