fixed an issue with entity validation