fixed bug with .extend