added handling for irregular data error