Fixed bug in gate function by adding period to gateId.
Updated RevealedPreferences.