Improved lmid stuff