NullPointer Bug for MainUI fixed