fix TypeError when sourceContents is already deleted. Fixes #131