fix modified flag error