Added button check for 'M_button' and 'E_button'.