Fix alias rewriting