memory fix in exception