Fix assign_to deprecation warning