proper handling of threefold repetition on client side