Further bug fixes in timeout management