Make sure you have checked "research" as the villager's preferred skill -- if you don't, they may wander off and do other things when you aren't looking (i.e. when you close the game for the night).