bug fix for occasional NPE upon startup