But there are still pitfalls ahead.