Fix some issues with repo init