Fixed EGT methods to get rid of memory leaks