Fixed mouseinbounds method