Update Setting function and fix frontend