removed another lock in input thread