patch cleanup

(cherry picked from commit ce3b676ea7d4b6d643682365ccfd1f81d169a494)