fixes db connection