fixed weird button behavior