bug fixes for rename