Fix for #407.