fname generation fix