Alter memory passing so it shan't segfault. I hope.