Fix NPE on "/gate list" command