Fix for #378