Fix of NPE found by Piero in android app