bug fix for database manager