Fixes + tests