next_live and prev_live methods fixed