Fix button logic