Fixed and improved data source handling.