Correct typo
Add first test for sources and fix global leak in jsonsource, thanks pietu