Removed some minor bugs from npdm code which show up when we use spin embedding with dummy blocks.