Fix for db connection