Mouse grab fixes