Few fixes

- thread notification callback
- handle array initialization