Fixed a missing ref to and old callback function