fix pointer change problem