Fix NameError: name '_rl' is not defined