Make support for sided gates

#1881