Fix for #896 #863