Removed bug from gates.py