fixing dimension unmatch in getClass