Fixed upload_init_template