maybe fixing nil error