Correct the conditions and order of execution

- If the hidden from navigation checkbox is not provided the data would
  have been empty and thus the data would remain unindexed.
- Also corrected some other interfaces to ensure the correct things are
  executed in order.