Fix incorrect number of child views being displayed