MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'u.username' in 'order clause'
Query:
SELECT * FROM ( SELECT s.sid, s.ip, s.uid, s.time, s.location, u.username, s.nopermission, u.invisible, u.usergroup, u.displaygroup, row_number() OVER (PARTITION BY s.uid, s.ip ORDER BY time DESC) AS row_num FROM mybb_sessions s LEFT JOIN mybb_users u ON (s.uid = u.uid) WHERE s.time > 1634497727 ) s WHERE row_num = 1 ORDER BY u.username ASC, s.time DESC LIMIT 0, 20