Typo corrected
Small bug in rename function