Made minor changes to the gates.py file.