another attempt to fix the nil error