Better handling of unknown classes