fix onclick after sort