fixed null pointer and interns issue