Cleanup to close external reference issue