fixes for rounding error and touch mouse masking