BUG: compilation issue when passing pointer ref