Fixed issue with name rewriting