fix bug in mail