Fixed fetch_val() on empty result