Fix NPE in coremod and Groups