entity source and test fixes