patch conditional + export