Fix finalizer placement

Change-Id: I47056c5b8bb1fa9f5e0d087fcabe4a1df4881944
Merge pull request #398 from Senjai/privatize_finalizer

Fix finalizer placement