Fixed root path issues when using CLI