fix source extraction