better prevention of name clashes

Contains the change we discussed in #76