Fix for #374