fixed comingFromInternal() function