Fix setVisible of undefined