Fixed memory access violation... inherited from the old ornlm code.