Added timeout to listener