resource fix, mostly ok now.