fixed error caused when data is unavaible