Made some minor changes to the gates.py file.