Fix emit is caught twice on the server side