Bugfix for slow db connections