fixes, tests etc