Fixing DB acccess in remaining tests