fix db problems. fix urlpatterns