Fixes problems with hiding cursor in Chrome