Fixed depricated warnings