fix #2271 and gate slot rcolor rendering bug