Added check to ensure view doesn't get hidden more than once