Fix error in timeout initialization + tests