add extra check to view did appear