writeLabel and writeLink fixes