Fixed manifest writing issue