Fix rewrite error

Error occurs while reindexing URLs