fix used memory