fixed HUUUUUGE bug in vectorized api