couple of fixes for atlas expansion algorithm