Fixed deprecated methods not allowing compile