Fixes for callback hangings in Linux