Fixed performance issues on land rewrite