fix aliasing violations