Added focus guard