minor fixes, ready for tests