Fixes a bug where the attributes instance variable was being referenced wrongly