Context length fixes