fixes + new tests