fixed compile errors
fixed daoopt downoad script