Set a timeout value so that it don't stuck