Fixed some deploy bugs