minor fixes + fix tests