fixed some problems with new db