fixed button reference bugs