fix bug cs and send mail