Small fixes on connection JS