fixes for db connections