BUG Fixed issues with test cases and running in CLI