Fixing memory issues again.