some pointer cleanup for printing and exceptions