Fix for #942 #944