figured out some odd behaviour of the extend function
ok, figured out that the extend was extending the prototypes of objects in special cases
and things are back to normal