Fixed issue where connection fails in webkit-based browsers