Added timeout function.