- Moved the call to set view offset outside of the condition statement scope