Bug fix for attribute parsing, unit test