potential NPE fixed