fixed same js for buttons