Fixes possible bug when given name contain dot.

Signed-off-by: crynobone <crynobone@gmail.com>