Free memory fix.