fixing crasher with resource bindings