Fixes for reconnection bug + IE compatibility issue