[FIX] Bugfix on generate_sources_json function