was assuming such cases are already handled before this function is called, but seems to be broken on windows and linux. Do `safe_normalize()` so the tests pass, will check the problem afterwards.