Fixed problem when more than one dimension is removed