Don't append id to URL if it's undefined. Issue: #370