man example update and some bug fix