fix not passing extendSingleton() reference properly bug and add tests cases so it wont regress
update changelog