switch: fix for single gate