Small optimization

- few less operations
- added header to callback