fix null-reference error on android