Bugs/962

merge fix for #962