fix composite pattern bug