fixed sorting by modified bug