Fix for #331