Fixed a bug if a class have no methods