fixed pointer bug for scalar arguments