fix pointer location
fix an initial warning