Replace method of subclasses when you replace last block of a class