fix bug causing new socket connection every time presentation switched.
reversed the parameters on showAlert function to make alterType optional