RKS-Magic function maintenance

RKS-Magic function maintenance