fixed the massive RAM usage.