fixes for database module