fixed bug with normalization that was causing endless loop.