Fixed a silly issue which caused an endless loop when parsing attributes