fixed a couple of bugs in investor db and added a bit of doc.