fixed socket callbacks