Fix for database exception.