Fixed memory error, maybe