bugfix for 'as' attribute