cpu and memory usage fixed!