Fix possible overflow