Fix some problems in electric-ng