Fix bug with names of rules having trailling whitespaces.