improving availability check

was failing on IE