Fix subject name parsing.

Try to find name, if not presented use literal value.