Minors optimisations on lem rendering