Your Karma is defined by your Actions plus your Intent. A seemingly incorrect action with a pure intent can potentially result in good Karma