sort_moves ftw, mate fixes