Improved mouse capture