fixed callback id usage

Minor fix by saving the callback id from addCallback.