optimize the last commit, get rid of those useless logic

optimize the last commit, get rid of those useless logic

Signed-off-by: Ray Allen <ray@ray-Lenovo-IdeaPad-S400.(none)>