Free memory afterwards