Added timeout for promises