fix ajax settings NPE, make response reusable