Fix some deploy bugs