Fix for #510.