Fix bug in rename. Fix bug in config check