fixed bug in query_sources that doesn't return all sources and sentences.