fix for tcp listener crash