Apply patches