Fixed some deprecation warning