fix + tests