Fix rewrite 2.0. Close #3