Updated for rewrite changes.