Previous commit was incorrect. This would correctly handle the memory loss case.
Whitespace cleanup to previous commit