More attempted fixes at database access