fix patch bug