bugfix for database classes