Bug correction + Mail

Some bug correction, and add the Mail tool