add gm command panic protection