Added some stability when called via cli