fixed some button bugs