Changed order of retne and guard_lock.unlock