Fix similarity() to accept non-integer properties