Fixing removeAttr when number is provided

Rehash of #801 except against minor so we can release this fix with 2.1

Thanks @janza