fix rotating gates