Fixed a bug in extensions