Apparently s->ctx could be NULL at this point (see earlier