Fix mouse motion at border