porting #208 workaround