Normalize

Fixed the normalize function