Fix Bug

Fix bugs in check_and_sendmail.py and virgin.py
Change ndb representation;