Hacking the Gate function

Gate doesn't work for value types such as char, int, etc.