He made a mistake, but finally he solved the problem __________ it got worse.
#30987
A
until
B
before
C
when
D
as