fix tests  + test --end