Make active condition work with fragments