Fixed error with pop_ld function return values