Fixed bug where setAttribute() was non-virtual