fix ruby electric mode bug