fix bug in get_last
add timeout to relaxxapi