fixed bug
fixed bug in similarity computation