Fix for #376