Fix console errors if src is empty