Fix bug when you are running with CLI way