Bug fix in generic source handling