fix extend on class objects