enable assertions and fix tests