bug fixing and better help messages