fixes when using CLI