Fix broken prototype chain by extending prototype