del some modes and fixed gen mem issue