bugfix iterator advance