fix Load Mail procedure, fix database