Since hydraulic oil contamination is the main culprit in dieseling, your first step is to address any issues that could potentially introduce air to the hydraulic system, upon commissioning, fill the cylinder with clean hydraulic fluid through the service ports before connecting the hoses, and cylinders should then be stroked without load several times, being especially mindful not to create pressure at the end-stroke.