added crash fix when margin of collection view is selected for replacement.