Fix for #347