Yet some more changes to fix the button bug