fixed a bug in the button updating procedure for when a new button is created.