fix bug with setting buttons