Fixed memory usage (wip)