Bugfix for jQuery attr check