Update and fix tests