exit in case of bad pointer access