fixing settings queries