Fixed another null pointer problem with generateMethodID.