Fixed a bug in _increment_name

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>