Fix for #928
Fix for #935