cleanup DIP code for 64-bit