fix for #387