fixed cli solver bug and added test for cli