Minor clean up for code review
Merge pull request #1304 from ke-yu/fix_magn2279

Minor clean up for code review