fixed populate db errors