fixing button behaviors