Bug fix for #394.