Adding check for torrent_alert, fixed segfault when session_callback is not set, and more.