Added timeout functions.