fixing inActive handling issue