Minor fixes, tests