adding test for modified flag, fix for plot label