Fixing button states