Issue was caused by OptiFine, not ram