fixed potential NPE from last commit