Fix memory smasher in error appending code.