fix undefined source var

Fix exception when source is not provided as an option