Fix patch conditions