Add parts to fix Android crash