Use extends instead of ref so object is completely overwritten