Fix for Error 500 when renaming