Have you tried printing your vectors into a log, sometimes hovering over those pins lies. Are you checking for divide by 0?