fixed connection check: firefox does not support async:false