Improving temporal resolution of ultrafast electron diffraction by eliminating arrival time jitter induced by