bugfix when adding attributes starting with underscore