What was the capital of Poland in 1640?