Fixed link logic in download JS