Removed unnecessary normalization because it was called too early. Moved it to a proper position.