fixes to simpledb