fix indentation, and add check for xstrings