use a form of attr that will always set the value. fixes #810