location. Contributed by Ming Ma. (cherry picked from commit 1708a4cd2377c56e2cb5738720b7eaf10baf13c8)