Fix some visibility flag issues and view controller assignment issues
Merge branch 'master' into view-controller-fix
Merge branch 'master' into view-controller-fix