clean and fix tests