db update and minor fixes