fix broken init command and add test