Fixed depricated functions