Fix aliasing violations