Fix aliasing issues