abstract bugfix, mouse detection