fix unique name handling