Added the check_button function in remote.c