Add curInput in if()