Accuracy control of drug dispensing