Fixed a callback issue that was causing a crash