fixing a bug in the patching of subviewdidchange