fixed issue where Class functions were not copy'd when extending