bugfix for use with socketloop