fix deploy bugs
Ref #31 paginate for message statistics and fix some bugs