Minor fixes to JSONPLoader. Missing callback cleanup, and RTE on error