Bugfix

fix condition processing in buttons method