Fixing bug that prevented multiple DB connections