Use patches instead of sed