fix generating filename or url bug