Remove unnecessary unsafe block