Code cleanup
Hide view only if is visible