flush settings && some fixes