issue #1639:set visible to correct value