porting #200 fix