updated fix for hasdata