fixed vector divide by zero error