Coping with International Capital Flows