fix prepare script