Fixed some deprecation errors.