some minor fixes and cli