Fixing bugs of button display