Added encopding, still have problem for encoding nil class on line 37