Changed start and end positions to correct for y and z