Bug fixes and support for including reverse flag