add buttons reverse

and fix few bugs