Fix exception on incoming connections