Fixed is_chmode_q to reflect the function