Deploy script tested and fixed