Fixed a bug with incorrect gate registration.