fix chaining of doInit calls in resource classes