update and fix tests