Fix smart attribute comparation

This is a patch for github issue #1040
THANKS.in update