Fixed bug introduced in commit bb18c9386d41c365cedbb6784f854c53638541c0.

(cherry picked from commit 78a015a7d2d9ba0c2b666f9c0dea66dcd82131d2)