Fix FC related to reported issue

https://apple.slimroms.net/redmine/issues/206

- last array index value is 5 not 6
- in general visibility actions should be checked
  against null.

cheers

Change-Id: Ia7eb8f609936f76d0cbf0a5cd94fe2b934377bfa