Fixed a bug where extension methods could not be added properly.