fixed handling of lost messages