updated email setting and fix bug about borrow validation.