Fixed bug visible property always returning true