Fix #19, Added timeout support