fix pointer access