fix get_modulation_state function