fix typo/bug in use-annotation
finalize hook, and support for profiling