Added additional check to OpenLink funtion