Fix check for valid visibility

Stupid mistake....