Refinements of necessary conditions for optimality in nonlinear programming