fix #30, add checks for data-src and src