Fix for #836