fixed bug on comparing vectors