Misc. fixes to pointer access