fixed some bugs, button actions missing