fix for max listeners exception