FIX: fix weight calculation first element was 0 in weight vector