fixed a bug in mail