Fixed timeout, and some ohter minor problems