fixed pointer conversion issues