Fixed error when a pin is attached to nothing or debug gates