Fixed issue #113.
Merge remote-tracking branch 'upstream/rewrite' into rewrite