Fix some bad redirections and unavailable variables