Fix mouse detection on startup