improved behaviour if deadlock occurs.