Move the normalmap size check upper in the code