fix using ram too much