Fix #6. Power to speed conversion issue in set_output_state function.