Fix problem with flickering mouse cursor