fix error undefined method text for Nil Class 3