fixed ReKS_main.m