Fixed bug with names
(cherry picked from commit b64046c)