fix pointer arguments to functions