Bug fix for #460