error control for the buttons on timestamp