Fix copy/paste error
Fix deprecated function usages