Fix to 63aafb9, fetch visible state from database.