Only print first class in error message