Max Gop Size update and resolve some security issues