fix synchronous email problem