Fixed a bug with extending