Added check for nameInSource