fix manage.sh, fixed firmware hooks