Updated rename logic

Fixes #5