Context Misleads LLMs: The Role of Context Filtering in Maintaining Safe Alignment of LLMs