fixes the reset db also makes the mail use a lessthan greaterthan with mailid