fixed buggy mouse behavior