this should be inside the if ($fieldAttribute) test too ???