Support rightBarButtonItems/leftBarButtonItems

fix a bug reported in #10 comments