Fix for #387