fix bug: exchange u and r