de-allocated all correction and function array variables, just to be safe