fixed document selector issues