The second part of the remote interface for toggling a surface: line 21 in my control.lua.
if type(bool) == true then --Rare case someone is trying to re-enable surface
type(bool) is "boolean" - this branch can never execute. Maybe you wanted bool == true ? or type(bool) == "boolean" and bool then . (and bool == true if we are being explicit)