minor fixs and changes due to rebuilding db