fixed several bugs in the button implementation.