Fix memory issue

One of many to come, I assume