fix alignment: use element type size not ptr type size!