Pointer-related fixes