Fixing bug where callbacks were not receiving the write context

- Callbacks would not receive the right context and would not be able to handle events