Correcting input lag