Fixing setVisible

Used to remove only one occurrence of "invisible" if it was in the class name,
now it removes all occurrences of the word "invisible"
Merge pull request #484 from adamrp/fix_set_visible

Fixing setVisible