fix a validation bug when arrow button clicked.