fix for empty source error