Fixing spell name function.