fix a bug when the source is manually cleared