Fix handling empty sources