Add timeout to wait