Minor change to stop End from writing data if there is none.