Added checking for Device visiblity