Resolved memory bug, hopefully not by adding another one.