fixed deprecation warnings dealing with #scope