Fixed fence gates opening, ignored client whitelist.

Also fixed a couple bugs that were exposed by this change.