Fixed get_data() not returning 0 in case of error.