Fixing invalidAttributes issue