Fog patch
(cherry picked from commit dd5dab3)