fixes + tests