Fix finalize for safari, firefox.