fix indexing issues
fix using disconnected as mem buffer
fix bug
so name fn appears
new test
Merge pull request #1614 from pascanur/new_fix_grad_scan

New fix grad scan