added clean meessages and fixed command line bug