fixed uninitialized dotproduct value