more fixes for database pointers