fixed deprecation errors