Fix db connect on deploy