Fix print ast tree function.