Bug fix and refactoring for betMaxButtonPressed.