Fix showing of gateway terms
Fix tests