Updated to actually set fgets_ret, oops