fixed sqrt(norm) error