Fix patch bug