added a control to check when the src attribute does not exist