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"