first commit for patch
(cherry picked from commit fde9672)