Stopped memory leak by adding missing callback