fix prepare deployment endpoint