Fixed tests
Fixed check for --edit-flag