fixed with case with magnitude = 0