fixed generate_url()
repaired generating url function