bug fixing for BasedEntity