fixed issues undefined nil class