minor fix for database access