altered setup to keep values even if db connection failed